<!--
 * @Author: xuhy 1727317079@qq.com
 * @Date: 2022-09-04 09:48:48
 * @LastEditors: xuhy 1727317079@qq.com
 * @LastEditTime: 2022-09-08 10:54:01
 * @FilePath: \vue3_test\src\App.vue
 * @Description: 父组件
-->
<template>
  <DemoTest msg="你好啊!" name="Hebe" @hello="showHelloMsg">
    <!-- 定义插槽v-slot -->
    <template v-slot:qwe>
      <span> 尚硅谷 </span>
    </template></DemoTest
  >
</template>

<script>
import DemoTest from "./components/DemoTest.vue";
export default {
  name: "App",
  components: {
    DemoTest,
  },
  setup() {
    function showHelloMsg(value) {
      alert(`你好啊, 你触发了hello事件, 我收到的参数是:${value}!`);
    }
    return {
      showHelloMsg,
    };
  },
};
</script>
